<?php

namespace Entity\Repository;


class UserRepository extends \Gedmo\Tree\Entity\Repository\NestedTreeRepository
{
    public function isSetEmail($email)
    {
        return $this->findOneByEmail($email);
    }


    public function getUserByName($name)
    {
        return $this->findOneByName($name);
    }

    public function getUsers(array $ids)
    {
        $qb = $this->createQueryBuilder('u');
        $qb->where($qb->expr()->in("u.id", $ids));
        return $qb->getQuery()->getResult();
    }
}